from typing import Any, Callable
from classes import check

def replace(dataset, data_filter: Callable, target: Any):
    type_ = type(dataset)
    if check.is_collection_type(type_):

    elif check.is_dict_type(type_):
        for k, v in dataset.items():
            if data_filter(v):
                dataset[k] = target
    else:
        raise TypeError("dataset must be a collection type or a dict type")    
    pass


for i in range(len(info_list)):
    for values in info_list[i].values():
        if values:
            if type(values) == dict:
                for k, v in values.items():
                    if pd.isna(v):
                        values[k] = ""
            if type(values) == list:
                for i in range(len(values)):
                    for j in range(len(values[i])):
                        if pd.isna(values[i][j]):
                            values[i][j] = ""
